//part1:C03:ex3.17.cpp -- to upcase.
#include <cctype>
#include <iostream>
#include <vector>
#include <string>

int main(void)
{
    using namespace std;
    vector<string> vString;
    string s;
    char tocontinue1 = 'y';
    cout << "Enter a word:\n";
    while (cin >> s)
    {
        vString.push_back(s);
        cout << "to continue (y or n)?\n";
        cin >> tocontinue1;
        if (tocontinue1 != 'y' && tocontinue1 != 'Y')
        {
            break;
        }
        cout << "Enter next word:\n";
    }
    cout << "result is :\n";
    for (auto &mem : vString) 
    {
        for (auto &c : mem)
        {
            c = toupper(c);
        }
        cout << mem << endl;
    }

    return 0;
}
